<?php
namespace app\wechat\controller;

class Invitation extends Common
{
    // 邀请合伙人
    public function index()
    {
        $id = db('partner')->where('member_id', session('member_id'))->value('id');
        if (request()->isAjax()) {
            $param = [
                'invitation_partner_id' => input('param.invitation_partner_id'),
                'partner_id' => $id
            ];
            $data = call_interface('get_invitation_award', $param);
            return json($data);
        } else {
            $param = [
                'partner_id' => $id
            ];
            $data = call_interface('get_invitation_index_info', $param);
            //dump($data);exit;
            $this->assign('data', $data['data']);
            return view();
        }
    }

}
